package com.thinkcube.edutainment.domain.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class CourseWorkData {
	@JsonProperty("coursework_id")
	String courseworkId;

	@JsonProperty("coursework_title")
	String courseworkTitle;

	@JsonProperty("coursework_due_date")
	String courseworkDueDate;

	@JsonProperty("coursework_status")
	boolean courseworkStatus;

	@JsonProperty("coursework_grade")
	String courseworkGrade;

	public CourseWorkData() {

	}

	public String getCourseworkId() {
		return courseworkId;
	}

	public void setCourseworkId(String courseworkId) {
		this.courseworkId = courseworkId;
	}

	public String getCourseworkTitle() {
		return courseworkTitle;
	}

	public void setCourseworkTitle(String courseworkTitle) {
		this.courseworkTitle = courseworkTitle;
	}

	public String getCourseworkDueDate() {
		return courseworkDueDate;
	}

	public void setCourseworkDueDate(String courseworkDueDate) {
		this.courseworkDueDate = courseworkDueDate;
	}

	public boolean getCourseworkStatus() {
		return courseworkStatus;
	}

	public void setCourseworkStatus(boolean courseworkStatus) {
		this.courseworkStatus = courseworkStatus;
	}

	public String getCourseworkGrade() {
		return courseworkGrade;
	}

	public void setCourseworkGrade(String courseworkGrade) {
		this.courseworkGrade = courseworkGrade;
	}

	protected CourseWorkData(Parcel in) {
		courseworkId = in.readString();
		courseworkTitle = in.readString();
		courseworkDueDate = in.readString();
		courseworkStatus = in.readByte() != 0x00;
		courseworkGrade = in.readString();
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(courseworkId);
		dest.writeString(courseworkTitle);
		dest.writeString(courseworkDueDate);
		dest.writeByte((byte) (courseworkStatus ? 0x01 : 0x00));
		dest.writeString(courseworkGrade);
	}

	public static final Parcelable.Creator<CourseWorkData> CREATOR = new Parcelable.Creator<CourseWorkData>() {
		public CourseWorkData createFromParcel(Parcel in) {
			return new CourseWorkData(in);
		}

		public CourseWorkData[] newArray(int size) {
			return new CourseWorkData[size];
		}
	};

}
